package com.hua.api.core.activemq.consumer.event.impl;

import com.alibaba.fastjson.JSONObject;
import com.hua.api.core.activemq.consumer.event.ActiveMqEvent;
import com.hua.api.core.activemq.consumer.event.EventConstant;
import com.hua.api.modules.message.service.SmsSenderService;
import com.hua.api.modules.message.service.UserMessageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

// 订单确认
@Slf4j
@Component(EventConstant.event_sms_sender)
public class SmsSenderEvent implements ActiveMqEvent {

    @Autowired
    private SmsSenderService smsSenderService;

    @Override
    public void doEvent(JSONObject data) {
        log.info("SmsSenderEvent 短信发送 data={}", data.toJSONString());
        smsSenderService.onSmsSender(data);
    }

}
